package com.lwc.cfdns.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lwc.cfdns.pojo.bo.system.DictDataBO;
import com.lwc.cfdns.pojo.dto.system.DictDataDTO;
import com.lwc.cfdns.pojo.entity.SystemDictData;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lwc.cfdns.pojo.vo.system.DictDataVO;

import java.util.List;
import java.util.Map;

/**
 * @author spring
 * @description 针对表【cfdns_system_dict_data(字典数据表)】的数据库操作Service
 * @createDate 2023-05-28 20:44:32
 */
public interface SystemDictDataService extends IService<SystemDictData> {

    /**
     * 创建
     *
     * @param dictDataDTO
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/29 12:07:27
     */
    Map<String, Object> create(DictDataDTO dictDataDTO);

    /**
     * 修改
     *
     * @param dictDataDTO
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/29 12:07:48
     */
    Map<String, Object> update(DictDataDTO dictDataDTO);

    /**
     * 详情
     *
     * @param id
     * @return DictDataVO
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/29 12:10:01
     */
    DictDataVO view(Long id);

    /**
     * 删除
     *
     * @param ids
     * @return Map<String, Object>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/29 12:11:42
     */
    Map<String, Object> delete(String ids);

    /**
     * 列表
     *
     * @param dictDataBO
     * @return IPage<SystemDictData>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/29 12:17:12
     */
    IPage<SystemDictData> lists(DictDataBO dictDataBO);

    /**
     * 根据标识查询字典数据
     * 没有缓存自动缓存，有缓存读取缓存
     *
     * @param marks
     * @return List<DictDataVO>
     * @throws
     * @version 1.0.0
     * @author luwc
     * @time 2023/5/29 15:52:38
     */
    List<DictDataVO> cacheOfMarks(String marks);
}
